<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers" xmlns:be="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers" xmlns:notes="http://typo3.org/ns/TYPO3/CMS/SysNote/ViewHelpers">
<f:layout name="Default" />
<f:section name="main">

    <f:if condition="{notes}">
        <div class="note-list">
            <h2><f:translate key="internal_note" /></h2>
            <f:for each="{notes}" as="note">
                <div class="note note-category-{note.category}">
                    <div class="note-header">
                        <div class="note-header-bar">
                            <span class="note-icon t3js-contextmenutrigger" data-table="sys_note" data-uid="{note.uid}">
                                <core:icon identifier="sysnote-type-{note.category}" />
                            </span>
                            <span class="note-author">
                                <f:translate key="author" />:
                                <f:if condition="{note.authorDisabled} || {note.authorDeleted} || !{note.authorUsername}">
                                    <f:then>[{f:translate(key: 'author_deleted')}]</f:then>
                                    <f:else if="{note.authorRealName}">{note.authorRealName}</f:else>
                                    <f:else>{note.authorUsername}</f:else>
                                </f:if>
                            </span>
                            <span class="note-date">
                                <f:translate key="date" />:
                                <f:format.date>@{note.tstamp}</f:format.date>
                            </span>
                            <f:if condition="{note.personal}">
                                <span class="note-badge">
                                    <span class="badge badge-info"><f:translate key="personal" /></span>
                                </span>
                            </f:if>
                            <span class="note-actions">
                                <span class="btn-group">
                                    <be:link.editRecord uid="{note.uid}" table="sys_note" class="btn btn-default btn-sm">
                                        <core:icon identifier="actions-open" />
                                    </be:link.editRecord>
                                    <a href="{be:moduleLink(route:'tce_db', query:'cmd[sys_note][{note.uid}][delete]=1', currentUrlParameterName:'redirect')}" class="btn btn-default btn-sm t3js-modal-trigger" data-severity="warning" data-title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:delete')}" data-content="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:deleteWarning')}" data-button-close-text="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')}">
                                        <core:icon identifier="actions-edit-delete" />
                                    </a>
                                </span>
                            </span>
                        </div>
                    </div>
                    <div class="note-body">
                        <h4><span><f:if condition="{note.category}"><f:translate key="category.{note.category}" />: </f:if></span>{note.subject}</h4>
                        <f:format.nl2br>{note.message}</f:format.nl2br>
                    </div>
                </div>
            </f:for>
        </div>
    </f:if>

</f:section>
</html>
